﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MinConsole.Gaf.Utils.Log;

namespace MinConsole.Gaf.Utils
{
    public class ErrorHandler
    {


        //final catch 
        public static void Trap(System.Diagnostics.StackTrace st, Exception ex)
        {
            string methodName = st.GetFrame(1).GetMethod().Name;
            string className = st.GetFrame(1).GetFileName();
            int lineNumber = st.GetFrame(1).GetFileLineNumber();

            Logger.Debug("The following exception occured " + ex.Message);
            Logger.Debug("className " + className);
            Logger.Debug("methodName " + methodName);
            Logger.Debug("lineNumber " + lineNumber);

        }//eof method 


    }
} //eof namespace 
